/*
 * Copyright Iain Sproat, 2008
 * 
 *
 */
using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace FreeBase.Domain
{
	/// <summary>
	/// This is an object which holds parsed JSON response data
	/// from a MQL query
	/// </summary>
	[JsonObject( MemberSerialization.OptIn)]
	public class Response<T>
	{
		public Response()
		{
		}
		
		[JsonProperty("status")]
		public string Status{ get; set; }
		
		[JsonProperty("code")]
		public string Code{ get; set; }
		
		[JsonProperty("result")]
		public IList<T> Result{ get; set; }
		
		[JsonProperty("transaction_id")]
		public string TransactionId{ get; set; }
	}
	
	[JsonObject( MemberSerialization.OptIn)]
	public class ResponseForLinq<T>
	{
		public ResponseForLinq()
		{
		}
		
		[JsonProperty("status")]
		public string Status{ get; set; }
		
		[JsonProperty("code")]
		public string Code{ get; set; }
		
		[JsonProperty("result")]
		public T Result{ get; set; }
		
		[JsonProperty("transaction_id")]
		public string TransactionId{ get; set; }
	}
}
